// packageA/detail_v2/mycomponent/goodsComponent/cloud_shop_plugin/Service_guarantee/Service_guarantee.js
const app = getApp();
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    goods_info: {
      type: null,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    show: false,
    ruleShow: false,
    rule: []
  },

  /**
   * 组件的方法列表
   */
  methods: {
    showOpen() {
      this.setData({
        show: true
      })
    },
    show_close() {
      this.setData({
        show: false
      })
    },
    ruleShowClose() {
      this.setData({
        ruleShow: false
      })
    },
    async ruleShowTap(e) {
      let {
        id
      } = e.currentTarget.dataset;
      let {
        data
      } = await app._postNetWork({
        url: app.getNetAddresss("plugin.cloud-shop.frontend.service-note.detail"),
        data: {
          id: id
        }
      })
      if (data.result) {
        this.setData({
          rule: data.data,
          ruleShow: true
        })
      } else {
        app.tips(data.msg)
      }
    }
  }
})